package com.example.tests;

import org.testng.annotations.Test;

public class TestContactCreation extends TestBaseClassForAddressBook {

	@Test
	public void firstContactAddition() throws Exception {
		openMainPage();
		openContactCreationForm();
		FillContactFormWithDataParameter parameter = new FillContactFormWithDataParameter();
		parameter.firstname = "Anatoly";
		parameter.lastname = "kushnarev";
		parameter.firstaddress = "Moscow, Leninsky prospect";
		parameter.homephone = "does not exist";
		parameter.mobilephone = "89252093417";
		parameter.workphone = "does not exist";
		parameter.email = "anatkush@gmail.com";
		parameter.secondemail = "ecranku@freemail.com";
		parameter.birthdate = "7";
		parameter.birthmonth = "August";
		parameter.birthyear = "1973";
		parameter.grouptokeepcontact = "Rob";
		parameter.secondaddress = "Moscow";
		parameter.sparephone = "does not exist";
		fillContactFormWithData(parameter);
		finishContactcreation();
		goBackHomePage();
	}
	
	@Test
	public void secondContactAddition() throws Exception {
		openMainPage();
		openContactCreationForm();
		FillContactFormWithDataParameter parameter = new FillContactFormWithDataParameter();
		parameter.firstname = "Anatoly";
		parameter.lastname = "kushnarev";
		parameter.firstaddress = "Moscow, Leninsky prospect";
		parameter.homephone = "does not exist";
		parameter.mobilephone = "89252093417";
		parameter.workphone = "does not exist";
		parameter.email = "anatkush@gmail.com";
		parameter.secondemail = "ecranku@freemail.com";
		parameter.birthdate = "7";
		parameter.birthmonth = "August";
		parameter.birthyear = "1973";
		parameter.grouptokeepcontact = "Rob";
		parameter.secondaddress = "Moscow";
		parameter.sparephone = "does not exist";
		fillContactFormWithData(parameter);
		finishContactcreation();
		goBackHomePage();
	}
}